package com.lyn.solitude_plugin;

import android.os.Bundle;
import android.os.Handler;
import android.os.Looper;
import androidx.annotation.Nullable;
import androidx.lifecycle.Observer;

import com.lyn.xplugin.databinding.ActivityFirstBinding;
/**
 * @author longyn 2024/4/21
 * @version 1.0.0
 */
public class FirstActivity extends BaseActivity<ActivityFirstBinding> implements Observer<Boolean> {

    private final Handler handler = new Handler(Looper.getMainLooper());

    @Override
    public ActivityFirstBinding getViewBinding() {
        return ActivityFirstBinding.inflate(getLayoutInflater());
    }

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
    }

    @Override
    public void onChanged(Boolean aBoolean) {
        if (!aBoolean){
            return;
        }
        handler.postDelayed(() -> jump(MainActivity.class),1000);
    }

    @Override
    public void onBackPressed() {

    }
}
